Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

298
Vistas
Django redirecting http -> https

I am running:

python manage.py runserver localhost:44100

And this is redirecting me to https:

» http http://localhost:44100/
HTTP/1.0 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Date: Mon, 05 Mar 2018 14:09:09 GMT
Location: https://localhost:44100/
Server: WSGIServer/0.1 Python/2.7.14
X-Frame-Options: SAMEORIGIN

Why / how is this happening? What setting does control whether Django accepts http / https?

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

The runserver command only handles http.

However if you have SECURE_SSL_REDIRECT set to True then you will be redirected from http to https.

See the Django docs on SSL/HTTPS for more information.

over 4 years ago · Santiago Trujillo Denunciar

0

My best guess is that in the settings.py file of your project you have set

SECURE_SSL_REDIRECT = True

which causes your http to redirect to https. You can read about it here.

If that is the case, you might want to remove that line and clear your browser cache before it starts to work as intended.

over 4 years ago · Santiago Trujillo Denunciar

0

Use python manage.py runssslserver to handle SSL and https. You have to install django-sslserver first and set it in

INSTALLED_APPS = [
'sslserver',
]
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda